Package com.cisco.pt.ipc.sim.impl
Class DNSClientImpl
java.lang.Object
com.cisco.pt.ipc.impl.IPCObjectImpl
com.cisco.pt.ipc.sim.impl.ProcessImpl
com.cisco.pt.ipc.sim.impl.DNSClientImpl
Information provided by the PKI file:
\class DnsClient
\brief DnsClient is the process that handles retrieving DNS lookups.
\example network().getDevice("PC0").getProcess("DnsClient")
- Author:
- Auto-generated
-
Field Summary
Fields inherited from class com.cisco.pt.ipc.impl.IPCObjectImpl
accessMessage, ipcFactory, packetTracerSession -
Constructor Summary
ConstructorsConstructorDescriptionDNSClientImpl(IPCFactory ipcFactory, PacketTracerSession packetTracerSession, IPCMessageLTV accessMessage) -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddIpAddress(String hostname, IPAddress ipAddress) Information provided by the PKI file:getHostAt(int index) Information provided by the PKI file:getIpOfHost(String hostname) Information provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:intInformation provided by the PKI file:booleanInformation provided by the PKI file:booleanisHostNameExisted(String hostname) Information provided by the PKI file:booleanisIpExisted(String hostname, IPAddress ipAddress) Information provided by the PKI file:booleanisValidName(String hostname) Information provided by the PKI file:voidInformation provided by the PKI file:voidremoveIpAddress(String hostname) Information provided by the PKI file:voidsetEnabled(boolean bEnable) Information provided by the PKI file:voidsetServerIp(IPAddress ipAddress) Information provided by the PKI file:voidsetServerIpv6(IPV6Address ipAddress) Information provided by the PKI file:Methods inherited from class com.cisco.pt.ipc.sim.impl.ProcessImpl
getOwnerDeviceMethods inherited from class com.cisco.pt.ipc.impl.IPCObjectImpl
getAccessMessage, getClassName, getFactory, getObjectUUID, getPacketTracerSession, sendMessage, sendMessageWithReturn, translateToCommandStatusStringPairMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.cisco.pt.ipc.IPCObject
getAccessMessage, getClassName, getFactory, getObjectUUID, getPacketTracerSessionMethods inherited from interface com.cisco.pt.ipc.sim.Process
getOwnerDevice
-
Constructor Details
-
DNSClientImpl
public DNSClientImpl(IPCFactory ipcFactory, PacketTracerSession packetTracerSession, IPCMessageLTV accessMessage)
-
-
Method Details
-
addIpAddress
Information provided by the PKI file:
\brief Adds a DNS entry with the specified hostname and IP address to the DNS table. \param hostname, the hostname of the node. \param ipAddress, the IP address of the node. \return bool, true if successful, otherwise false.- Specified by:
addIpAddressin interfaceDNSClient- Parameters:
hostname- Takes in a parameter of hostnameipAddress- Takes in a parameter of ipAddress- Returns:
- boolean Returns a boolean
-
removeIpAddress
Information provided by the PKI file:
\brief Removes the DNS entry from the table based on the hostname. \param hostname, the hostname associated with the IP address to remove.- Specified by:
removeIpAddressin interfaceDNSClient- Parameters:
hostname- Takes in a parameter of hostname
-
removeIp
Information provided by the PKI file:
\brief Removes the DNS entry from the table based on the hostname and the IP address. \param hostname, the hostname of the node. \param ipAddress, the IP address of the node. -
isValidName
Information provided by the PKI file:
Returns true if the hostname is a valid name (non-special characters), otherwise false. \param hostname, the hostname of interest. \return bool, true if the hostname is a valid name (non-special characters), otherwise false.- Specified by:
isValidNamein interfaceDNSClient- Parameters:
hostname- Takes in a parameter of hostname- Returns:
- boolean Returns a boolean
-
setServerIp
Information provided by the PKI file:
\brief Sets the IP address of the DNS server. \param ipAddress, the DNS server IP address.- Specified by:
setServerIpin interfaceDNSClient- Parameters:
ipAddress- Takes in a parameter of ipAddress
-
getServerIp
Information provided by the PKI file:
\brief Returns the IP address of the DNS server. \return ip, the DNS server ip address.- Specified by:
getServerIpin interfaceDNSClient- Returns:
- IPAddress Returns a IPAddress
-
getServerIpv6
Information provided by the PKI file:
\brief Returns the IPv6 address of the DNS server. \return ipv6, the DNS server ipv6 address.- Specified by:
getServerIpv6in interfaceDNSClient- Returns:
- IPV6Address Returns a IPV6Address
-
setServerIpv6
Information provided by the PKI file:
\brief Sets the IPv6 address of the DNS server. \param ipAddress, the DNS server IPv6 address.- Specified by:
setServerIpv6in interfaceDNSClient- Parameters:
ipAddress- Takes in a parameter of ipAddress
-
setEnabled
public void setEnabled(boolean bEnable) Information provided by the PKI file:
\brief Enable or disable Dns Client Process \param bEnable, true to enable, otherwise false.- Specified by:
setEnabledin interfaceDNSClient- Parameters:
bEnable- Takes in a parameter of bEnable
-
isEnabled
public boolean isEnabled()Information provided by the PKI file:
\brief Returns true if this DNS client process is enabled, otherwise false. \return bool, true if this DNS client process is enabled, otherwise false. -
getStrToIpCount
public int getStrToIpCount()Information provided by the PKI file:
\brief Returns the number of DNS entries in the DNS table. \return int, the number of DNS entries in the DNS table.- Specified by:
getStrToIpCountin interfaceDNSClient- Returns:
- int Returns a int
-
getHostAt
Information provided by the PKI file:
\brief Returns the hostname at the specified index. \param index, the index of the hostname of interest. \return string, the hostname at the specified index. -
isHostNameExisted
Information provided by the PKI file:
\brief Returns true if the hostname exists in the DNS table, otherwise false. \param hostname, the hostname of interest. \return bool, true if the hostname exists in the DNS table, otherwise false.- Specified by:
isHostNameExistedin interfaceDNSClient- Parameters:
hostname- Takes in a parameter of hostname- Returns:
- boolean Returns a boolean
-
isIpExisted
Information provided by the PKI file:
\brief Returns true if the hostname and IP address DNS entry exists, otherwise false. \param hostname, the hostname to lookup. \param ipAddress, the IP address to lookup. \return bool, true if the hostname and IP address entry exists, otherwise false.- Specified by:
isIpExistedin interfaceDNSClient- Parameters:
hostname- Takes in a parameter of hostnameipAddress- Takes in a parameter of ipAddress- Returns:
- boolean Returns a boolean
-
getIpOfHost
Information provided by the PKI file:
\brief Returns a list of IP addresses associated with the specified hostname. \param hostname, the hostname of interest. \return vector<ip>, the list of IP addresses associated with the specified hostname.- Specified by:
getIpOfHostin interfaceDNSClient- Parameters:
hostname- Takes in a parameter of hostname- Returns:
- List<IPAddress> Returns a List<IPAddress>
-